//
//  CCConfig.swift
//  CCFoundation
//
//  Created by zjh on 2021/8/26.
//

import UIKit

let isIPhone6 =  UIScreen.main.currentMode?.size == CGSize.init(width: 750, height: 1334)
let isIPhoneX =  UIScreen.main.currentMode?.size == CGSize.init(width: 1125, height: 2436)
let isIPhoneXR =  UIScreen.main.currentMode?.size == CGSize.init(width: 828, height: 1792)
let isIPhoneXs_Max =  UIScreen.main.currentMode?.size == CGSize.init(width: 1242, height: 2688)
let isIPhone12 =  UIScreen.main.currentMode?.size == CGSize.init(width: 1170, height: 2532)
let isIPhone12_Max =  UIScreen.main.currentMode?.size == CGSize.init(width: 1284, height: 2778)

let isIPhoneX_All =  isIPhoneX || isIPhoneXR || isIPhoneXs_Max || isIPhone12 || isIPhone12_Max

let CCWidth = UIScreen.main.bounds.size.width
let CCHeight = UIScreen.main.bounds.size.height

@inline(__always) func CCScale(n:CGFloat)->CGFloat{
    return n/375.0*CCWidth
}
